package com.suse.mybatisdemo.mapper;


import com.suse.mybatisdemo.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ArticleInfoMapper {

    @Select("select ta.*, tb.username, tb.age from articleinfo ta " +
            "left join userinfo tb on ta.uid= tb.id " +
            "where ta.id = #{articleId}")
    ArticleInfo queryArticleInfo(Integer id);
}
